package com.lujianfei.redpacketstat.di

import com.lujianfei.redpacketstat.database.AppDatabase
import com.lujianfei.redpacketstat.ui.viewmodel.MainViewModel
import com.lujianfei.redpacketstat.ui.viewmodel.UserDetailViewModel
import org.koin.dsl.module
import org.koin.androidx.viewmodel.dsl.viewModel

val viewModelModule = module {
    viewModel { MainViewModel(get()) }
    viewModel { UserDetailViewModel(get()) }
}

val localModelModule = module {
    single { AppDatabase.instance }
}

val appModule= listOf(viewModelModule, localModelModule)